package com.itheima.springboot_06_demo.mapper;

import com.itheima.springboot_06_demo.pojo.Dept;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeptMapper {

    @Select("select * from tb_dept")
    List<Dept> list();

    @Insert("insert into tb_dept (id,name) values (#{id}, #{name})")
    void add(Dept dept);
}
